<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 引入 Bootstrap -->
    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <style>
        .form-horizontal .control-label {
            text-align: left;
        }
    </style>
</head>

<body>

    <!-- 
        container  响应式的版心   max-width:1170px
     -->

    <header>
        <div class="container">
            <form class="form-horizontal" role="form">
                <div class="form-group has-error">
                    <label for="firstname" class="col-sm-1 control-label">名字</label>
                    <div class="col-sm-11">
                        <input type="text" class="form-control" id="firstname" placeholder="请输入名字">
                    </div>
                </div>
                <div class="form-group has-success">
                    <label for="lastname" class="col-sm-2 control-label">姓</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" id="lastname" placeholder="请输入姓">
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <div class="checkbox">
                            <label>
                                <input type="checkbox">请记住我
                            </label>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button type="submit" class="btn btn-default">登录</button>
                    </div>
                </div>
            </form>
        </div>
    </header>

</body>

</html>